#ifndef JUMPCONTROLLER_H_
#define JUMPCONTROLLER_H_

#include "GameObject.h"

#include <vector>

#include <SFML/Graphics.hpp>

class JumpController : public GameObject
{
public:
	JumpController(GameState *gameState);
	~JumpController();

	void update(double dt);
  void draw();

  double getAngle() { return m_angle; }
  double getSpeed() { return m_speed; }

  void setAngle(double angle) { m_angle = angle; }
  void setSpeed(double speed) { m_speed = speed; }

  bool isReadyToJump() ;

private:
  double m_time;
  double m_angle;
  double m_speed;

  double m_maxAngle;
  double m_maxSpeed;
  double m_arcTime;
  int m_arcSign;
  double m_radius;
  int m_maxVertices;
  std::vector<sf::Vector2f> m_vertices;
  sf::Vector2f m_dotAngle;
  sf::Vector2f m_dotSpeed;

  int m_state; //0 parat, 1 esperant angle, 2 esperant velocitat, 3 ja pot botar
  bool m_space;
  bool m_click;

  int m_lastVertex;

};


#endif
